downsample Function

public pure function downsample(n, fs, x) result(rst)

Downsamples an evenly sampled signal by the specified factor.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: n

The downsample factor. The value must be non-zer and positive valued.

real(kind=real64), intent(in) :: fs

The original signal sample rate, in Hz.

real(kind=real64), intent(in), dimension(:) :: x

The signal to downsample.

Return Value real(kind=real64), allocatable, dimension(:)

The downsampled signal.